
package com.seekting.study;

import com.google.gson.Gson;

public class GJson {

    private int type;
    private String json;
    private static final Gson GSON = new Gson();

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getJson() {
        return json;
    }

    public void setJson(String json) {
        this.json = json;
    }

    public void setJson(GGJson ggJson) {
        this.json = GSON.toJson(ggJson);
    }

    public GGJson getGGJson() {
        return GSON.fromJson(json, SubGGJson.class);
    }

}
